<template>
	<view @click="close" class="mask">
		<view class="content">
			<uni-easyinput type="textarea" v-model="desc" focus placeholder="请输入不一致原因"></uni-easyinput>
			<view class="btn-nav">
				<button type="primary" size="mini" class="btn" @click.stop="onClick">确定</button>
				<button size="mini" class="btn" @click.stop="close">取消</button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				desc: ''
			}
		},
		methods: {
			onClick() {
				let pages = getCurrentPages();
				let prevPage = pages[pages.length - 2];
				prevPage.$vm.toPath({
					bol: false,
					desc: this.desc
				})
				uni.navigateBack()
			},
			close() {
				uni.navigateBack()
			}
		}
	}
</script>

<style>
	page {
		background: transparent;
	}

	.mask {
		position: fixed;
		left: 0;
		top: 0;
		right: 0;
		bottom: 0;
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		justify-content: center;
		align-items: center;
		background-color: rgba(0, 0, 0, 0.4);
	}

	.content {
		width: 200px;
		height: 160px;
		padding: 10px;
		background-color: #fff;
	}
	
	.btn-nav {
		display: flex;
		margin-top: 10px;
		justify-content: center;
	}
</style>
